home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / procssng / ccs / ccs-11tl.lha / lbl / hips / man / gen_lbl_hips_man < prev    next >
Encoding:
Text File  |  1991-09-17  |  1.1 KB  |  40 lines

  1. # /bin/csh
  2. # script to generate man page summarizing LBL HIPS programs
  3. # Brian Tierney, LBL
  4. #
  5. set echo
  6. set verify
  7. set sdir=$cwd/
  8. # set output file name here
  9. set outfile=hips_lbl.n
  10. #
  11. rm  $outfile
  12. cat /dev/null > $sdir/$outfile
  13. echo '.TH HIPS_LBL 1 "DEC. 18, 1990" "LBL-HIPS"' >> $sdir/$outfile
  14. echo '.SH LBL HIPS'  >> $sdir/$outfile
  15. echo 'This is a synopsis of all HIPS modules written at' >> $sdir/$outfile
  16. echo 'Lawrence Berkeley Laboratory.' >> $sdir/$outfile
  17. #
  18. # list of directories containing man pages
  19.  
  20. set DIRS = (/home/itg1/src/HIPS2/local/hips/man \
  21.         /home/itg1/src/HIPS2/local/x11/man \
  22.         /home/itg1/src/HIPS2/local/xview/man )
  23.  
  24. foreach dir ($DIRS)
  25.    pushd $dir
  26.    set names = (*.n)
  27.    foreach man_file ($names)
  28. # get everything from NAME to SYNOPSIS
  29. #   then delete NAME and SYNOPSIS
  30.         sed -n -e '/SH NAME/,/SH SYNOPSIS/p' $man_file | \
  31.     sed 's/.SH NAME//' |  \
  32.     sed 's/.SH SYNOPSIS//' >> $sdir/$outfile
  33.    end
  34.    popd
  35. end
  36. echo '.SH LBL MAINTENCE ' >> $sdir/$outfile
  37. echo 'Brian Tierney, LBL        email: bltierney@lbl.gov ' >> $sdir/$outfile
  38. echo '.SH "SEE ALSO"' >> $sdir/$outfile
  39. echo 'All of these programs have their own man page.' >> $sdir/$outfile
  40.